import Vue from 'vue'
import request from '@/itsoftUI/utils/request'
import qs from "qs"
const settingtUrl = Vue.prototype.$itsoftUI.config.serviceUrl + "/apartment"
//系统参数api
const settingApi = {
    //列表
    List: function () {
        const data = {};
        return request({
            url: settingtUrl + "/systemSetting/list",
            method: "post",
            data: qs.stringify(data)
        });
    },
    //根据参数配置数据
    Batch: function (json, systemId) {
        const data = {
            json,
            systemId
        };
        return request({
            url: settingtUrl + "/systemSetting/batch",
            method: "post",
            data: qs.stringify(data)
        });
    },
    //获取校区信息
    getCampusInfo(level){
        const data = {level};
        return request({
            url: settingtUrl + "/manageRoom/getBuildingTree",
            method: "post",
            data: qs.stringify(data)
        });
    }
}

export {
    settingApi
}
